/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
// pcdial.hpp - Interface for the PegCircularDial class
//
// Author: Jim DeLisle
//
// Copyright (c) 1997-2000 Swell Software 
//              All Rights Reserved.
//
// Unauthorized redistribution of this source code, in whole or part,
// without the express written permission of Swell Software
// is strictly prohibited.
//
// Notes:
//
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/

#ifndef _PCDIAL_HPP_
#define _PCDIAL_HPP_

/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
class PegCircularDial : public PegDial
{
    public:
        PegCircularDial(const PegRect& Rect, PEGINT RefAngle,
                        PEGLONG ValuePerRev, PEGLONG MinValue, PEGLONG MaxValue,
                        PEGULONG Style = DS_STANDARDSTYLE);

        virtual ~PegCircularDial();

        virtual void Draw(const PegRect &Invalid);
        PEGINT GetRefAngle() const { return mRefAngle; }
        PEGLONG GetValuePerRev() const { return mValuePerRev; }
        virtual void SetLimits(PEGINT RefAngle, PEGLONG ValuePerRev,
                               PEGLONG MinValue, PEGLONG MaxValue);
        
    protected:
        virtual void CalcNeedlePos();
        virtual void DrawTicMarks();
        virtual PEGINT ValToAngle(PEGLONG Val);

        PEGLONG mValuePerRev;
        PEGINT mRefAngle;
};

#endif // _PCDIAL_HPP_


